package com.jicheng.Utils;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * @ClassName: ResultMess
 * @Description: TODO
 * @author: khz
 * @date: 2020年08月21日 14:28
 */
@ApiModel("Result")
public class ResultMess<T> implements Serializable {
    @ApiModelProperty(value = "状态码")
    private boolean code;
    @ApiModelProperty(value = "信息")
    private String message = "";
    @ApiModelProperty(value = "数据")
    private T data;

    public ResultMess(boolean code, String message) {
        this(code, message, null);
    }

    public ResultMess(boolean code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public ResultMess() {
        this(false, "", null);
    }

    public boolean getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}


